#include <iostream>
#include <vector>

using namespace std;

class MyComplex
{
public:
    int real1, imaginary1, real2, imaginary2; // 对应两个虚数
    int add_r, add_i;                         // 相加的结果
    int min_r, min_i;                         //相减的结果

    MyComplex(int a, int b, int x, int y) : real1(a), imaginary1(b), real2(x), imaginary2(y)
    {
        add_r = 0;
        add_i = 0;
        min_r = 0;
        min_i = 0;
    }

    void myAdd()
    {
        add_r = real1 + real2;
        add_i = imaginary1 + imaginary2;
    }

    void myMinus()
    {
        min_r = real1 - real2;
        min_i = imaginary1 - imaginary2;
    };

    void showAnswer()
    {
        // 第一种，实部虚部都是0
        if (add_r == 0 and add_i == 0)
            cout << 0 << endl;
        // 第二种，实部是0，虚部不是0
        else if (add_r == 0)
            cout << add_i << "i" << endl;
        // 第三种，实部不是0，虚部是0
        else if (add_i == 0)
            cout << add_r << endl;
        // 第四种，实部虚部都不是0
        else
        {
            if (add_i > 0)
                cout << add_r << "+" << add_i << "i" << endl;
            else
                cout << add_r << add_i << "i" << endl;
        }

        // 第一种，实部虚部都是0
        if (min_r == 0 and min_i == 0)
            cout << 0 << endl;
        // 第二种，实部是0，虚部不是0
        else if (min_r == 0)
            cout << min_i << "i" << endl;
        // 第三种，实部不是0，虚部是0
        else if (min_i == 0)
            cout << min_r << endl;
        // 第四种，实部虚部都不是0
        else
        {
            if (min_i > 0)
                cout << min_r << "+" << min_i << "i" << endl;
            else
                cout << min_r << min_i << "i" << endl;
        }
    }
};

int main(int argc, const char *argv[])
{
    vector<MyComplex> vec;
    vector<MyComplex>::iterator iter;
    int a, b, x, y;
    while (cin >> a >> b)
    {
        cin >> x >> y;
        vec.emplace_back(a, b, x, y);
    }

    for (iter = vec.begin(); iter != vec.end(); ++iter)
    {
        iter->myAdd();
        iter->myMinus();
        iter->showAnswer();
    }
    return 0;
}
